
project(OLCommands)

# 收集源文件
file(GLOB_RECURSE SRC_FILES 
    "*.cpp" 
    "*.cxx" 
    "*.cc"
    "*.hpp" 
    "*.h"
)

# 创建共享库
add_library(OLCommands SHARED ${SRC_FILES})

# 仅在 Windows 下定义导出宏
if(WIN32)
    target_compile_definitions(OLCommands PRIVATE COMMANDS_API)
endif()

# 查找Qt依赖
find_package(Qt5 COMPONENTS Widgets Core Gui PrintSupport REQUIRED)

# 添加依赖项
target_link_libraries(OLCommands 
    PRIVATE 
    Qt5::Widgets
    Qt5::Core
    Qt5::Gui
    Qt5::PrintSupport
	OL3D
	OLKits
	OLApp
	OLCore
	OLPython
	OLDialogx
	OLDatax
	OLWidgets
	OLExchange
	OLRibbon
    ${THIRD_PARTY_LIBS}
)

# 添加头文件目录
target_include_directories(OLCommands 
    PUBLIC 
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${CMAKE_SOURCE_DIR}/src/OL3D
	${CMAKE_SOURCE_DIR}/src/OLKits
	${CMAKE_SOURCE_DIR}/src/OLApp
	${CMAKE_SOURCE_DIR}/src/OLCore
	${CMAKE_SOURCE_DIR}/src/OLPython
	${CMAKE_SOURCE_DIR}/src/OLDialogx
	${CMAKE_SOURCE_DIR}/src/OLDatax
	${CMAKE_SOURCE_DIR}/src/OLWidgets
	${CMAKE_SOURCE_DIR}/src/OLExchange
	${CMAKE_SOURCE_DIR}/src/OLRibbon
)
